<template>
    <div>
      <h1>demo</h1>
      <h2>{{title}}</h2>
    </div>
</template>

<script>
import { onBeforeMount, onMounted} from 'vue'
export default {
  data() {
    return {
      title: 'options'
    }
  },
  beforeCreate() {
    console.log('beforeCreate')
  },
  created() {
    console.log('created')
  },
  beforeMount() {
    console.log('beforeMount', this.title)
  },
  setup() {
    const title = 'composition API'
    onBeforeMount(() => {
      console.log('onBeforMounted', title)
    })
    onMounted(() => {
      console.log('onMounted', title)
    })
    return {
      title
    }
  }
}
</script>

<style>

</style>